package cn.kduck.webapp;

import cn.kduck.security.UserExtInfo;
import cn.kduck.webapp.login.UserExtInfoImpl;
import cn.kduck.webapp.security.UserDetailsServiceImpl;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.security.core.userdetails.UserDetailsService;

@SpringBootApplication
@ComponentScan("cn.kduck")
public class Application {

    @Bean
    public UserDetailsService userDetailsService(){
        return new UserDetailsServiceImpl();
    }

    @Bean
    public UserExtInfo userExtInfo(){
        return new UserExtInfoImpl();
    }

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }
}
